
Technical Q&A's
GXPD 13 - QuickDraw GX Print Extension (1-May-95)
Q I'm working on a GX print extension that needs to call some C++
routines. Is there a way to accomplish this with either MPW or Metrowerks?
A It is possible to include C++ code in a QuickDraw GX print extension, but it
may be difficult, depending on the compiler you choose. There is a related
article in issue 4 of develop, which is available on the Developer CD Series.
This code does everything necessary to initialize your C++ vtables, since in a
stand-
alone
code resource (your print driver), this is not done for you by the runtime
support. Note that vtable layouts are C++ compiler specific.
Support for CFront is being discontinued, so you may want to look into using
Symantec's C/C++ for Macintosh or MetroWerks C/C++. The glue code referred to
in the develop 4 issue article needs to be modified to work with
Symantec's/MetroWerks' compilers. Note that documentation on exact vtable
layout in Symantec/MetroWerks may not be readily available.
You could also use the Code Fragment Manager. However, this would work only for
the PowerPC environment at this time, since a Code Fragment Manager is not yet
available for the 68K environment. CFM fragments can be written in any
language, including C++.
Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Main |
Page One |
What's New |
Apple Computer, Inc. |
Find It |
Contact Us |
Help